<p align="center">Item</p>

<table width="100%" border="1">
    
  <tr>
    <td width="22"><center>itemID</center></td>
    <td width="22"><center>itemName</center></td>
    <td width="22"><center>
      <p>price</p>
      <p>[BATH]</p>
    </center></td>
    <td width="22"><center>categoryName</center></td>
    <td width="22"><center>itemPicture</center></td>
    <td width="22"><center>QRImage</center></td>
    <td width="22"><center>dateAdd</center></td>
    <td width="22"><center>itemQTY</center></td>
    </tr>
  <?php
  error_reporting(E_ERROR);
$host="localhost";
$username="root";
$pass_word="";
$db="SWGeekStore";
$Conn = mysql_connect( $host,$username,$pass_word) or die ("cannot connect:" . mysql_error());
  
mysql_select_db($db) or die("cannot select database:".mysql_error() ); 

 	$sql = "select * from Item ";
	$query = mysql_db_query($db, $sql);
while($result = mysql_fetch_array($query)) {
include 'read_image.php';
?>  

  <tr>
    <td align="center"><?=$result[itemID]?></td>
    <td align="center"><?=$result[itemName]?></td>
    <td align="center"><?=$result[price]?></td>
    <td align="center"><?=$result[catName]?></td>
    <td align="center"><img width="80" height="80" src="<?php echo image_uri($result['itemPicture'], 'image/jpeg'); ?>" alt="item image" /></td>
    <td align="center"><img width="80" height="80" src="<?php echo image_uri($result['QRImage'], 'image/png'); ?>" alt="item qrcode" /></td>
    <td align="center"><?=$result[dateAdd]?></td>
    <td align="center"><?=$result[itemQTY]?></td>
	<? } ?>
</table>
<p>&nbsp;</p>
<table align="right" width="30%" border="0">
  <tr>
<td align="right"><a href="index.php?view=add">Add New Item</td>
  </tr>
</table>

</table>
</table>

